package main.java.view;

import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.JPanel;

public class BlocView extends JPanel {
	
    //static final panel title
    private static final String PANEL_TITLE = " Door and Gear";
    
    private GearsView gearsView;
    private DoorsView doorsView;
    private String set;

    /**
     * Constructor BlocView
     * @param set : which set
     */
    public BlocView(String set) {
        //Initialize panel info
        this.set = set;
        this.setBackground(Color.white);
        this.setBorder(BorderFactory.createTitledBorder(set + PANEL_TITLE));
        
        //Instantiation of the views
        gearsView = new GearsView();
        doorsView = new DoorsView();

        //Adding items to the view
        this.add(doorsView);        
        this.add(gearsView);
    }

    public GearsView getGearsView() {
        return gearsView;
    }

    public void setGearsView(GearsView gearsView) {
        this.gearsView = gearsView;
    }

    public DoorsView getDoorsView() {
        return doorsView;
    }

    public void setDoorsView(DoorsView doorsView) {
        this.doorsView = doorsView;
    }

    public String getSet() {
        return set;
    }

    public void setSet(String set) {
        this.set = set;
    }
}
